package com.example.vv.model.chat.base.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.example.vv.R;
import com.example.vv.frameWork.entity.ChatEntity;
import com.example.vv.frameWork.view.MyAdapter;

public class ChatAdapter extends MyAdapter<ChatEntity.BaseData, ChatAdapter.ViewHolder> {


    public ChatAdapter(Context mContext) {
        super(mContext);
    }

    @Override
    public int setLayout() {
        return R.layout.item_chat;
    }

    @Override
    public ViewHolder setViewHolder(View view) {
        return new ViewHolder(view);
    }

    @Override
    protected void initView(ChatEntity.BaseData data, int position, ViewHolder viewHolder) {

    }


    public static
    class ViewHolder extends RecyclerView.ViewHolder {
        public View rootView;
        public ImageView item_chat_image;
        public TextView item_chat_name;
        public TextView item_chat_content;
        public TextView item_chat_info;

        public ViewHolder(View rootView) {
            super(rootView);
            this.rootView = rootView;
            this.item_chat_image = (ImageView) rootView.findViewById(R.id.item_chat_image);
            this.item_chat_name = (TextView) rootView.findViewById(R.id.item_chat_name);
            this.item_chat_content = (TextView) rootView.findViewById(R.id.item_chat_content);
            this.item_chat_info = (TextView) rootView.findViewById(R.id.item_chat_info);
        }

    }
}
